<div class="container-fluid-full" style="overflow: visible">
    <div class="row-fluid">
        <div class="row-fluid">
            <div class="text-center logo">
                <img src="<?php echo Yii::app()->baseUrl . '/' . Options::getItem('logo', 'header') ?>" />
            </div>
            <div class="login-box">
                <?php if (Yii::app()->user->hasFlash('success')): ?>
                    <div class="alert alert-success">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong>All done!</strong> <?php echo Yii::app()->user->getFlash('success'); ?>
                    </div>
                <?php endif; ?>
                <?php
                $form = $this->beginWidget('CActiveForm', array(
                    'id'                   => 'login-form',
                    'enableAjaxValidation' => true,
                    'htmlOptions'          => array('class' => 'form-horizontal'),
                    'focus'                => array($model, 'email'),
                    'clientOptions'        => array(
                        'validateOnSubmit' => true,
                    ),
                ));
                ?>
                <h1>Webmaster Login</h1>

                <?php echo $form->errorSummary($model); ?>
                <?php
                echo $form->textField($model, 'email', array(
                    'placeholder' => $model->getAttributeLabel('email'),
                    'class'       => 'input-large span12',
                ));
                ?>
                <font color="red"><?php echo $form->error($model, 'email'); ?></font>
                <?php
                echo $form->passwordField($model, 'password', array(
                    'placeholder' => $model->getAttributeLabel('password'),
                    'class'       => 'input-large span12',
                ));
                ?>
                <font color="red"><?php echo $form->error($model, 'password'); ?></font>

                <div class="clearfix"></div>
                <?php if ($this->action != NULL AND $this->action->id == 'login'): ?>
                    <h3>Login as:</h3>
                    <div style="margin-left: 50px">
                        <label class="radio" for="optionsRadios1">
                            <input type="radio" name="role" id="optionsRadios1" value="<?php echo Users::TYPE_BUSINESS ?>" checked="checked">
                            Merchant
                        </label>
                        <div style="clear:both"></div>
                        <label class="radio" for="optionsRadios2">
                            <input type="radio" name="role" id="optionsRadios2" value="<?php echo Users::TYPE_STAFF ?>">
                            Staff
                        </label>
                    </div>

                    <?php if (UserLoginForm::REMEMBER_ME): ?>
                        <label for="remember">
                            <input style="margin-bottom: 5px;" name="UserLoginForm[rememberMe]" type="checkbox" id="remember" />&nbsp;<?php echo Yii::t('main', 'Remember me') ?></label>
                    <?php endif; ?>
                    <br>
                    <?php
                    echo CHtml::submitButton(Yii::t('main', 'Log In'), array('class' => 'btn btn-primary span12'));
                    ?>
                    <br><br>
                    <?php echo Yii::t('main', 'By logging in, your agree to Webmaster\'s') ?> <a style="color:#08c" target="_blank" href="<?php echo Yii::app()->createUrl('frontend/page/index', array('url' => 'merchant-agreement')) ?>">
                        <?php echo Yii::t('main', 'terms and Conditions') ?></a>
                    <hr>
                    <h3><?php echo Yii::t('main', 'Forgot your password?') ?></h3>
                    <p>
                        <?php echo Yii::t('main', 'No problem') ?>, <strong><a href="<?php echo Yii::app()->createUrl('site/forgotPassword') ?>"><font  color="#1E8FC6" ><?php echo Yii::t('main', 'click here') ?></font></a></strong> <?php echo Yii::t('main', 'to get a new password') ?>.
                    </p>
                    <!--<h3>Not have account?</h3>-->
                    <?php // echo CHtml::link('Register', Yii::app()->createUrl('site/signup'), array('class' => 'btn btn-info span6')) ?>
                <?php elseif ($this->action != NULL AND $this->action->id == 'admin'): ?>
                    <input type="hidden" name="role" value="<?php echo Users::TYPE_ADMIN ?>">
                    <input type="hidden" name="redirect" value="<?= (isset($redirect) && !empty($redirect)) ? $redirect : ((isset($_GET['redirect']) && !empty($_GET['redirect'])) ? $_GET['redirect'] : "") ?>">
                    <?php if (UserLoginForm::REMEMBER_ME): ?>
                        <label for="remember">
                            <input style="margin-bottom: 5px;" name="UserLoginForm[rememberMe]" type="checkbox" id="remember" />&nbsp;<?php echo Yii::t('main', 'Remember me') ?></label>
                    <?php endif; ?>
                    <?php
                    echo CHtml::submitButton(Yii::t('main', 'Log In'), array('class' => 'btn btn-primary span12'));
                    ?>
                    <!--Concierge-->
                <?php else: ?>
                    <input type="hidden" name="role" value="<?php echo Users::TYPE_CONCIERGE ?>">
                    <?php if (UserLoginForm::REMEMBER_ME): ?>
                        <label for="remember">
                            <input style="margin-bottom: 5px;" name="UserLoginForm[rememberMe]" type="checkbox" id="remember" />&nbsp;<?php echo Yii::t('main', 'Remember me') ?></label>
                        <?php endif; ?>
                        <?php
                        echo CHtml::submitButton(Yii::t('main', 'Log In'), array('class' => 'btn btn-primary span12'));
                        ?>
                    <hr>
                    <h3><?php echo Yii::t('main', 'Forgot your password?') ?></h3>
                    <p>
                        <?php echo Yii::t('main', 'No problem') ?>, <strong><a href="<?php echo Yii::app()->createUrl('site/forgotPassword') ?>"><font  color="#1E8FC6" ><?php echo Yii::t('main', 'click here') ?></font></a></strong> <?php echo Yii::t('main', 'to get a new password') ?>.
                    </p>
                <?php endif; ?>
            </div>
            <?php $this->endWidget(); ?>

        </div><!--/row-->
    </div><!--/fluid-row-->

</div><!--/.fluid-container-->
<?php
$css = ".row-fluid .logo{margin-top: 28px}.login-box{margin-top:22px!important}";
cs()->registerCss("#" . uniqid(), $css);
?>